package com.jianggy.jdbc.xa;

import javax.transaction.xa.Xid;

/**
 * @author jianggy
 * @version 1.0
 * @time 2019/12/9 17:27
 * @see
 **/
public class MyXid implements Xid {
    private int formatId;
    private byte[] gtrid;
    private byte[] bqual;

    public MyXid(int formatId,byte[] gtrid,byte[] bqual){
        this.formatId = formatId;
        this.gtrid = gtrid;
        this.bqual = bqual;
    }
    @Override
    public int getFormatId() {
        return formatId;
    }

    @Override
    public byte[] getGlobalTransactionId() {
        return gtrid;
    }

    @Override
    public byte[] getBranchQualifier() {
        return bqual;
    }
}
